<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:41:"./themes/admin/system\account_config.html";i:1596592084;s:24:"./themes/admin/base.html";i:1601430315;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>人脸识别后台</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="stylesheet" href="__JS__/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="__CSS__/font-awesome.min.css">
    <!--CSS引用-->
    
    <link rel="stylesheet" href="__CSS__/admin.css">
    <!--[if lt IE 9]>
    <script src="__CSS__/html5shiv.min.js"></script>
    <script src="__CSS__/respond.min.js"></script>
    <![endif]-->
</head>
<script src="__JS__/jquery.min.js"></script>
<body>
<div class="layui-layout layui-layout-admin">
    <!--头部-->
    <div class="layui-header header">
        <a href=""><img class="logo" src="__STATIC__/images/admin_logo.png" alt=""></a>
        <ul class="layui-nav" style="position: absolute;top: 0;right: 20px;background: none;">
            <!--<li class="layui-nav-item"><a href="<?php echo url('/'); ?>" target="_blank">前台首页</a></li>-->
            <li class="layui-nav-item"><a href="" data-url="<?php echo url('admin/system/clear'); ?>" id="clear-cache">清除缓存</a></li>
            <li class="layui-nav-item">
                <a href="javascript:;"><?php echo session('admin_name'); ?></a>
                <dl class="layui-nav-child"> <!-- 二级菜单 -->
                    <dd><a href="<?php echo url('admin/change_password/index'); ?>">修改密码</a></dd>
                    <dd><a href="<?php echo url('admin/login/logout'); ?>">退出登录</a></dd>
                </dl>
            </li>
        </ul>
    </div>

    <!--侧边栏-->
    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <ul class="layui-nav layui-nav-tree">
                <li class="layui-nav-item layui-nav-title"><a>管理菜单</a></li>
                <li class="layui-nav-item">
                    <a href="<?php echo url('admin/index/index'); ?>"><i class="fa fa-home"></i> 网站信息</a>
                </li>
                <?php if(is_array($menu) || $menu instanceof \think\Collection || $menu instanceof \think\Paginator): if( count($menu)==0 ) : echo "" ;else: foreach($menu as $key=>$vo): if(isset($vo['children'])): ?>
                <li class="layui-nav-item">
                    <a href="javascript:;"><i class="<?php echo $vo['icon']; ?>"></i> <?php echo $vo['title']; ?></a>
                    <dl class="layui-nav-child">
                        <?php if(is_array($vo['children']) || $vo['children'] instanceof \think\Collection || $vo['children'] instanceof \think\Paginator): if( count($vo['children'])==0 ) : echo "" ;else: foreach($vo['children'] as $key=>$v): ?>
                        <dd><a href="<?php echo url($v['name']); ?>"> <?php echo $v['title']; ?></a></dd>
                        <?php endforeach; endif; else: echo "" ;endif; ?>
                    </dl>
                </li>
                <?php else: ?>
                <li class="layui-nav-item">
                    <a href="<?php echo url($vo['name']); ?>"><i class="<?php echo $vo['icon']; ?>"></i> <?php echo $vo['title']; ?></a>
                </li>
                <?php endif; endforeach; endif; else: echo "" ;endif; ?>

                <li class="layui-nav-item" style="height: 30px; text-align: center"></li>
            </ul>
        </div>
    </div>

    <!--主体-->
    
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="layui-this">系统配置</li>
        </ul>
        <div class="layui-tab-content">
            <div class="layui-tab-item layui-show">
                <form class="layui-form form-container" action="<?php echo url('admin/system/updateAccountConfig'); ?>" method="post">
                    <div class="layui-form-item">
                        <label class="layui-form-label">价格</label>
                        <div class="layui-input-block">
                            <input type="text" name="account_config[money]" value="<?php echo (isset($account_config['money']) && ($account_config['money'] !== '')?$account_config['money']:''); ?>" placeholder="请输入价格" autocomplete="off" class="layui-input" required lay-verify="required">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">客服手机号</label>
                        <div class="layui-input-block">
                            <input type="text" name="account_config[mobile]" value="<?php echo (isset($account_config['mobile']) && ($account_config['mobile'] !== '')?$account_config['mobile']:''); ?>" placeholder="请输入客服手机号" autocomplete="off" class="layui-input" required lay-verify="required">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">客服微信号</label>
                        <div class="layui-input-block">
                            <input type="text" name="account_config[wx]" value="<?php echo (isset($account_config['wx']) && ($account_config['wx'] !== '')?$account_config['wx']:''); ?>" placeholder="请输入客服微信号" autocomplete="off" class="layui-input" required lay-verify="required">
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <label class="layui-form-label">微信二维码</label>
                        <div class="layui-input-block">
                            <input type="text" name="account_config[wx_code]" value="<?php echo (isset($account_config['wx_code']) && ($account_config['wx_code'] !== '')?$account_config['wx_code']:''); ?>" placeholder="请上传图片" class="layui-input layui-input-inline" readonly required>
                            <input type="file" name="file" class="layui-upload-file" data-type="0">
                        </div>
                        <div class="layui-input-block">
                            <a href="<?php echo $img_url; ?><?php echo (isset($account_config['wx_code']) && ($account_config['wx_code'] !== '')?$account_config['wx_code']:''); ?>" target="_blank" id="a_wx_code"><img src="<?php echo $img_url; ?><?php echo (isset($account_config['wx_code']) && ($account_config['wx_code'] !== '')?$account_config['wx_code']:''); ?>" style="width: 60px;height: 60px;" id="img_wx_code"></a>
                        </div>
                    </div>
                    <!--<div class="layui-form-item">-->
                        <!--<label class="layui-form-label">内容</label>-->
                        <!--<div class="layui-input-block">-->
                            <!--<textarea name="account_config[agreement]" class="layui-textarea" id="content"></textarea>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="layui-form-item">-->
                        <!--<label class="layui-form-label">付款方式</label>-->
                        <!--<div class="layui-input-block">-->
                            <!--<input type="checkbox" name="account_config[pay_type][]" value="1" title="积分" <?php if(in_array((1), explode(',',""))): ?> checked="checked"<?php endif; ?>>-->
                            <!--<input type="checkbox" name="account_config[pay_type][]" value="2" title="钱包" <?php if(in_array((2), explode(',',""))): ?> checked="checked"<?php endif; ?>>-->
                        <!--</div>-->
                    <!--</div>-->
                    <!--<div class="layui-form-item">-->
                        <!--<label class="layui-form-label">积分兑换比例（多少积分顶 1元）</label>-->
                        <!--<div class="layui-input-block">-->
                            <!--<input type="text" name="account_config[ratio]" value="<?php echo (isset($account_config['ratio']) && ($account_config['ratio'] !== '')?$account_config['ratio']:''); ?>" placeholder="请输入比例" autocomplete="off" class="layui-input" required lay-verify="required">-->
                        <!--</div>-->
                    <!--</div>-->
                    <div class="layui-form-item">
                        <div class="layui-input-block">
                            <button class="layui-btn" lay-submit lay-filter="*">提交</button>
                            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>

<script>
    $(function(){
        $('.layui-upload-file').click(function () {
            var id=this.dataset.type;
            layui.upload({
                url: "/index.php/api/upload/upload",
                type: 'image',
                ext: 'jpg|png|gif|bmp',
                success: function (data) {
                    if (data.error === 0) {
                        if(id=='0'){
                            $("input[name='account_config[wx_code]']").val(data.url);
                            $("#a_wx_code").attr('href','<?php echo $img_url; ?>'+data.url);
                            $("#img_wx_code").attr('src','<?php echo $img_url; ?>'+data.url);
                        }else if(id=='1'){
                            $("input[name='image[1]']").val(data.url);
                        }else if(id=='2'){
                            $("input[name='image[2]']").val(data.url);
                        }
                    } else {
                        layer.msg(data.message);
                    }
                }
            });
        });
    });
</script>


    <!--底部-->
    <div class="layui-footer footer">
        <div class="layui-main">
            <p>2016-2017 &copy; <a href="https://github.com/xiayulei/open_source_bms" target="_blank">Open Source BMS</a></p>
        </div>
    </div>
</div>

<script>
    // 定义全局JS变量
    var GV = {
        current_controller: "admin/<?php echo (isset($controller) && ($controller !== '')?$controller:''); ?>/",
        base_url: "__STATIC__"
    };
</script>
<!--JS引用-->

<script src="__JS__/layui/lay/dest/layui.all.js"></script>
<script src="__JS__/admin.js"></script>

<script src="__JS__/ueditor/ueditor.config.js"></script>
<script src="__JS__/ueditor/ueditor.all.min.js"></script>

<!--页面JS脚本-->

<script>
    var ue = UE.getEditor('content');
</script>

</body>
</html>